<%--
  ~ Copyright (c) 2017. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
  ~ Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
  ~ Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
  ~ Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
  ~ Vestibulum commodo. Ut rhoncus gravida arcu.
  --%>

<%--
  Created by IntelliJ IDEA.
  User: dengdc
  Date: 2017/7/19
  Time: 17:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="http://www.springframework.org/tags" %>
<html>
<head>
    <title>diyishou </title>
    <jsp:include page="../../head.jsp"/>
    <script type="text/javascript">
        //公司信息主键
        var agentRefId = '${agentRef.agentRefId}';

        var url = "/tGenComContact/list?arefId="+agentRefId;
        var formSetting = {
            grid: {
                id: "tGrid",
                title: "查询结果",
                url: url,
                colModel: [{
                    index: "COM_CONTACT_ID",
                    name: "comContactId",
                    label: '主键',
                    key: true,
                    hidden:true
                },
                {label: '姓名', name: 'name', index: 'name'},
                {label: '部门', name: 'dept', index: 'dept'},
                {label: '职务', name: 'position', index: 'position'},
                {label: '联系电话', name: 'telPhone', index: 'TEL_PHONE'},
                {label: '邮箱', name: 'email', index: 'email'},
                {label: 'QQ', name: 'qq', index: 'QQ'}]
            }
        };
        $(document).ready(function () {
            $("#table").mrdForm(formSetting);
            doResize();
            $(window).resize(function () {
                doResize();
            });

            $(".ui-jqgrid-title").text("联系人信息列表");
        });

        function doResize() {
            var ss = getPageSize();
            $("#tGrid").jqGrid('setGridHeight', ss.WinH - 100);
        }

        function getPageSize() {
            var winW, winH;
            if (window.innerHeight) {// all except IE
                winW = window.innerWidth;
                winH = window.innerHeight;
            } else if (document.documentElement && document.documentElement.clientHeight) {// IE 6 Strict Mode
                winW = document.documentElement.clientWidth;
                winH = document.documentElement.clientHeight;
            } else if (document.body) { // other
                winW = document.body.clientWidth;
                winH = document.body.clientHeight;
            }
            return {WinW: winW, WinH: winH};
        }
    </script>
</head>
<body>
<div id="table"></div>
<div id="winContent" style="display:none;margin:5px 5px 5px 5px;">
    <table width="100%" border="1" cellpadding="1" bordercolor="#eeeeee">
        <tr bgcolor="#FFFFFF">
            <td width="198" height="38" align="right" bgcolor="#f8f8f8">姓名：</td>
            <td width="345" align="left">
                <input type="hidden" id="comContactId" name="comContactId">
                <input id="name" name="name" size="45"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td width="198" height="38" align="right" bgcolor="#f8f8f8">部门：</td>
            <td width="345" align="left">
                <input id="dept" name="dept" size="45"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td width="198" height="38" align="right" bgcolor="#f8f8f8">职务：</td>
            <td width="345" align="left">
                <input id="position" name="position" size="45"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td width="198" height="38" align="right" bgcolor="#f8f8f8">联系电话：</td>
            <td width="345" align="left">
                <input id="telPhone" name="telPhone" size="45"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td align="right" height="38" bgcolor="#f8f8f8">邮箱：</td>
            <td align="left">
                <input id="email" name="email" size="45"/>
            </td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td align="right" height="38" bgcolor="#f8f8f8">QQ：</td>
            <td align="left">
                <input id="qq" name="qq" size="45"/>
            </td>
        </tr>
    </table>
</div>
</body>
</html>
